import { defineConfig } from '@umijs/max';
import defaultSettings from './defaultSettings';
import routes from './route';
import proxy from './proxy';

// const isDev = process.env.NODE_ENV === 'development';

export default defineConfig({
  base: '/web', // 非根目录运行
  publicPath: '/web/', // 非根目录发布

  antd: {},
  access: {}, // 依赖 initialState
  model: {},
  initialState: {},
  request: {},
  /**
  * @name layout 插件
  * @doc https://umijs.org/docs/max/layout-menu
  */
  layout: {
    ...defaultSettings,
  },
  routes, // 路由配置
  proxy, // 开启代理
  // base: isDev ? undefined : '/web/', // 设置项目根路径
  // publicPath: isDev ? undefined : '/web/', // 设置打包后资源路径
  npmClient: 'pnpm',
});
